extends Object


class_name BehaviorHelper


static func is_layer(hit_layer: int, e: CharacterEvent) -> bool:
    var body: Node2D = e.meta.body
    var body_rid: RID = e.meta.body_rid
    var layer: int = -1
    if body is Area2D:
        layer = body.collision_layer
    elif body is TileMap:
        layer = NodeHelper.get_tilemap_collision_layer(body, body_rid)
    return layer == hit_layer
